<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>TTMath: ttmath::Misc Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="ttmath_logo_for_doxygen_doc.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">TTMath
   &#160;<span id="projectnumber">0.9.4_prerelease_2019-07-31</span>
   </div>
   <div id="projectbrief">&nbsp;C++ bignum library</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','Search');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="namespacettmath.html">ttmath</a></li><li class="navelem"><a class="el" href="classttmath_1_1_misc.html">Misc</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-static-methods">Static Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">ttmath::Misc Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-static-methods"></a>
Static Public Member Functions</h2></td></tr>
<tr class="memitem:a77a225d405c1f54c28dfca566c486232"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a77a225d405c1f54c28dfca566c486232">AssignString</a> (std::string &amp;result, const char *str)</td></tr>
<tr class="separator:a77a225d405c1f54c28dfca566c486232"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7233e6204b8e57f5faaf5e627541d24e"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a7233e6204b8e57f5faaf5e627541d24e">AssignString</a> (std::wstring &amp;result, const char *str)</td></tr>
<tr class="separator:a7233e6204b8e57f5faaf5e627541d24e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0ab84b0f5dd68e5829cb48f19cf07891"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a0ab84b0f5dd68e5829cb48f19cf07891">AssignString</a> (std::wstring &amp;result, const std::string &amp;str)</td></tr>
<tr class="separator:a0ab84b0f5dd68e5829cb48f19cf07891"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7fa01e126fb56e13831bf6b24bce69ef"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a7fa01e126fb56e13831bf6b24bce69ef">AssignString</a> (std::string &amp;result, const wchar_t *str)</td></tr>
<tr class="separator:a7fa01e126fb56e13831bf6b24bce69ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:add85ddc6d2534f9cc210e0732d2135a7"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#add85ddc6d2534f9cc210e0732d2135a7">AssignString</a> (std::string &amp;result, const std::wstring &amp;str)</td></tr>
<tr class="separator:add85ddc6d2534f9cc210e0732d2135a7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acfe3356acfeb0a444481e6d6ccb5ba78"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#acfe3356acfeb0a444481e6d6ccb5ba78">AddString</a> (std::string &amp;result, const char *str)</td></tr>
<tr class="separator:acfe3356acfeb0a444481e6d6ccb5ba78"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8ba27713a01ba16eb923d9e4beeacf8c"><td class="memItemLeft" align="right" valign="top">static void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a8ba27713a01ba16eb923d9e4beeacf8c">AddString</a> (std::wstring &amp;result, const char *str)</td></tr>
<tr class="separator:a8ba27713a01ba16eb923d9e4beeacf8c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6046430880f5e9ae0938d614554c2366"><td class="memTemplParams" colspan="2"><a id="a6046430880f5e9ae0938d614554c2366"></a>
template&lt;class char_type &gt; </td></tr>
<tr class="memitem:a6046430880f5e9ae0938d614554c2366"><td class="memTemplItemLeft" align="right" valign="top">static void&#160;</td><td class="memTemplItemRight" valign="bottom"><b>SkipWhiteCharacters</b> (const char_type *&amp;c)</td></tr>
<tr class="separator:a6046430880f5e9ae0938d614554c2366"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a37c769adf7e2cb8a7533d04dea080ebf"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a37c769adf7e2cb8a7533d04dea080ebf">CharToDigit</a> (<a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c)</td></tr>
<tr class="separator:a37c769adf7e2cb8a7533d04dea080ebf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa2637677dbd7199d4e6b4cea89f7f9d9"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacettmath.html#a4b0a5dcba29a2c7a0abc8b4403a25ac4">sint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#aa2637677dbd7199d4e6b4cea89f7f9d9">CharToDigit</a> (<a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> c, <a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> base)</td></tr>
<tr class="separator:aa2637677dbd7199d4e6b4cea89f7f9d9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93a49aa7775f27e51feccc665c537277"><td class="memItemLeft" align="right" valign="top">static <a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classttmath_1_1_misc.html#a93a49aa7775f27e51feccc665c537277">DigitToChar</a> (<a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> digit)</td></tr>
<tr class="separator:a93a49aa7775f27e51feccc665c537277"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>some helpful functions </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00057">57</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="acfe3356acfeb0a444481e6d6ccb5ba78"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acfe3356acfeb0a444481e6d6ccb5ba78">&#9670;&nbsp;</a></span>AddString() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AddString </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result += str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00135">135</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;{</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    result += str;</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a8ba27713a01ba16eb923d9e4beeacf8c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a8ba27713a01ba16eb923d9e4beeacf8c">&#9670;&nbsp;</a></span>AddString() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AddString </td>
          <td>(</td>
          <td class="paramtype">std::wstring &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result += str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00146">146</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;{</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;    <span class="keywordflow">for</span>( ; *str ; ++str )</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;        result += *str;</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a77a225d405c1f54c28dfca566c486232"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a77a225d405c1f54c28dfca566c486232">&#9670;&nbsp;</a></span>AssignString() <span class="overload">[1/5]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AssignString </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result = str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00072">72</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;{</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    result = str;</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathobjects_8h_source.html#l00197">ttmath::Objects::Add()</a>, <a class="el" href="ttmathmisc_8h_source.html#l00095">AssignString()</a>, <a class="el" href="ttmathobjects_8h_source.html#l00371">ttmath::Objects::Delete()</a>, <a class="el" href="ttmathobjects_8h_source.html#l00330">ttmath::Objects::EditName()</a>, <a class="el" href="ttmathobjects_8h_source.html#l00276">ttmath::Objects::EditValue()</a>, <a class="el" href="ttmathobjects_8h_source.html#l00413">ttmath::Objects::GetValue()</a>, <a class="el" href="ttmathobjects_8h_source.html#l00505">ttmath::Objects::GetValueAndParam()</a>, <a class="el" href="ttmathparser_8h_source.html#l01626">ttmath::Parser&lt; ValueType &gt;::InsertFunctionToTable()</a>, <a class="el" href="ttmathparser_8h_source.html#l01643">ttmath::Parser&lt; ValueType &gt;::InsertVariableToTable()</a>, <a class="el" href="ttmathobjects_8h_source.html#l00157">ttmath::Objects::IsDefined()</a>, and <a class="el" href="ttmathparser_8h_source.html#l02726">ttmath::Parser&lt; ValueType &gt;::Parse()</a>.</p>

</div>
</div>
<a id="a7233e6204b8e57f5faaf5e627541d24e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7233e6204b8e57f5faaf5e627541d24e">&#9670;&nbsp;</a></span>AssignString() <span class="overload">[2/5]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AssignString </td>
          <td>(</td>
          <td class="paramtype">std::wstring &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result = str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00083">83</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;{</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;    result.clear();</div><div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;    <span class="keywordflow">for</span>( ; *str ; ++str )</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;        result += *str;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="a0ab84b0f5dd68e5829cb48f19cf07891"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0ab84b0f5dd68e5829cb48f19cf07891">&#9670;&nbsp;</a></span>AssignString() <span class="overload">[3/5]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AssignString </td>
          <td>(</td>
          <td class="paramtype">std::wstring &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::string &amp;&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result = str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00095">95</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;{</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classttmath_1_1_misc.html#a77a225d405c1f54c28dfca566c486232">AssignString</a>(result, str.c_str());</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div><div class="ttc" id="classttmath_1_1_misc_html_a77a225d405c1f54c28dfca566c486232"><div class="ttname"><a href="classttmath_1_1_misc.html#a77a225d405c1f54c28dfca566c486232">ttmath::Misc::AssignString</a></div><div class="ttdeci">static void AssignString(std::string &amp;result, const char *str)</div><div class="ttdef"><b>Definition:</b> <a href="ttmathmisc_8h_source.html#l00072">ttmathmisc.h:72</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmathmisc_8h_source.html#l00072">AssignString()</a>.</p>

</div>
</div>
<a id="a7fa01e126fb56e13831bf6b24bce69ef"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a7fa01e126fb56e13831bf6b24bce69ef">&#9670;&nbsp;</a></span>AssignString() <span class="overload">[4/5]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AssignString </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const wchar_t *&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result = str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00104">104</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;{</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    result.clear();</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">for</span>( ; *str ; ++str )</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        result += static_cast&lt;char&gt;(*str);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;}</div></div><!-- fragment -->
</div>
</div>
<a id="add85ddc6d2534f9cc210e0732d2135a7"></a>
<h2 class="memtitle"><span class="permalink"><a href="#add85ddc6d2534f9cc210e0732d2135a7">&#9670;&nbsp;</a></span>AssignString() <span class="overload">[5/5]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static void ttmath::Misc::AssignString </td>
          <td>(</td>
          <td class="paramtype">std::string &amp;&#160;</td>
          <td class="paramname"><em>result</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const std::wstring &amp;&#160;</td>
          <td class="paramname"><em>str</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>result = str </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00116">116</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;{</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classttmath_1_1_misc.html#a77a225d405c1f54c28dfca566c486232">AssignString</a>(result, str.c_str());</div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;}</div><div class="ttc" id="classttmath_1_1_misc_html_a77a225d405c1f54c28dfca566c486232"><div class="ttname"><a href="classttmath_1_1_misc.html#a77a225d405c1f54c28dfca566c486232">ttmath::Misc::AssignString</a></div><div class="ttdeci">static void AssignString(std::string &amp;result, const char *str)</div><div class="ttdef"><b>Definition:</b> <a href="ttmathmisc_8h_source.html#l00072">ttmathmisc.h:72</a></div></div>
</div><!-- fragment -->
<p class="reference">References <a class="el" href="ttmathmisc_8h_source.html#l00072">AssignString()</a>.</p>

</div>
</div>
<a id="a37c769adf7e2cb8a7533d04dea080ebf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a37c769adf7e2cb8a7533d04dea080ebf">&#9670;&nbsp;</a></span>CharToDigit() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> ttmath::Misc::CharToDigit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a>&#160;</td>
          <td class="paramname"><em>c</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>this static method converts one character into its value</p>
<p>for example:</p><ul>
<li>1 -&gt; 1</li>
<li>8 -&gt; 8</li>
<li>A -&gt; 10</li>
<li>f -&gt; 15</li>
</ul>
<p>this method don't check whether c is correct or not </p>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00181">181</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;{</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;    <span class="keywordflow">if</span>(c&gt;=<span class="charliteral">&#39;0&#39;</span> &amp;&amp; c&lt;=<span class="charliteral">&#39;9&#39;</span>)</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <span class="keywordflow">return</span> c-<span class="charliteral">&#39;0&#39;</span>;</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">if</span>(c&gt;=<span class="charliteral">&#39;a&#39;</span> &amp;&amp; c&lt;=<span class="charliteral">&#39;z&#39;</span>)</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;        <span class="keywordflow">return</span> c-<span class="charliteral">&#39;a&#39;</span>+10;</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno">  189</span>&#160;<span class="keywordflow">return</span> c-<span class="charliteral">&#39;A&#39;</span>+10;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathparser_8h_source.html#l01872">ttmath::Parser&lt; ValueType &gt;::ValueStarts()</a>.</p>

</div>
</div>
<a id="aa2637677dbd7199d4e6b4cea89f7f9d9"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa2637677dbd7199d4e6b4cea89f7f9d9">&#9670;&nbsp;</a></span>CharToDigit() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacettmath.html#a4b0a5dcba29a2c7a0abc8b4403a25ac4">sint</a> ttmath::Misc::CharToDigit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a>&#160;</td>
          <td class="paramname"><em>c</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a>&#160;</td>
          <td class="paramname"><em>base</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>this method changes a character 'c' into its value (if there can't be a correct value it returns -1)</p>
<p>for example:</p><ul>
<li>c=2, base=10 -&gt; function returns 2</li>
<li>c=A, base=10 -&gt; function returns -1</li>
<li>c=A, base=16 -&gt; function returns 10 </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00202">202</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;{</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;    <span class="keywordflow">if</span>( c&gt;=<span class="charliteral">&#39;0&#39;</span> &amp;&amp; c&lt;=<span class="charliteral">&#39;9&#39;</span> )</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;        c=c-<span class="charliteral">&#39;0&#39;</span>;</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;    <span class="keywordflow">if</span>( c&gt;=<span class="charliteral">&#39;a&#39;</span> &amp;&amp; c&lt;=<span class="charliteral">&#39;z&#39;</span> )</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        c=c-<span class="charliteral">&#39;a&#39;</span>+10;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;    <span class="keywordflow">if</span>( c&gt;=<span class="charliteral">&#39;A&#39;</span> &amp;&amp; c&lt;=<span class="charliteral">&#39;Z&#39;</span> )</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;        c=c-<span class="charliteral">&#39;A&#39;</span>+10;</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;    <span class="keywordflow">if</span>( c &gt;= base )</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;        <span class="keywordflow">return</span> -1;</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;<span class="keywordflow">return</span> <a class="code" href="namespacettmath.html#a4b0a5dcba29a2c7a0abc8b4403a25ac4">sint</a>(c);</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;}</div><div class="ttc" id="namespacettmath_html_a4b0a5dcba29a2c7a0abc8b4403a25ac4"><div class="ttname"><a href="namespacettmath.html#a4b0a5dcba29a2c7a0abc8b4403a25ac4">ttmath::sint</a></div><div class="ttdeci">int64_t sint</div><div class="ttdef"><b>Definition:</b> <a href="ttmathtypes_8h_source.html#l00243">ttmathtypes.h:243</a></div></div>
</div><!-- fragment -->
</div>
</div>
<a id="a93a49aa7775f27e51feccc665c537277"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93a49aa7775f27e51feccc665c537277">&#9670;&nbsp;</a></span>DigitToChar()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">static <a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a> ttmath::Misc::DigitToChar </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="namespacettmath.html#a5c1fccc9761aaa3d2b6dd32c224f5dac">uint</a>&#160;</td>
          <td class="paramname"><em>digit</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>this method converts a digit into a char digit should be from &lt;0,F&gt; (we don't have to get a base)</p>
<p>for example:</p><ul>
<li>1 -&gt; 1</li>
<li>8 -&gt; 8</li>
<li>10 -&gt; A</li>
<li>15 -&gt; F </li>
</ul>

<p class="definition">Definition at line <a class="el" href="ttmathmisc_8h_source.html#l00236">236</a> of file <a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a>.</p>
<div class="fragment"><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;{</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;    <span class="keywordflow">if</span>( digit &lt; 10 )</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;        <span class="keywordflow">return</span> digit + <span class="charliteral">&#39;0&#39;</span>;</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;</div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;<span class="keywordflow">return</span> digit - 10 + <span class="charliteral">&#39;A&#39;</span>;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;}</div></div><!-- fragment -->
<p class="reference">Referenced by <a class="el" href="ttmathuint_8h_source.html#l03316">ttmath::UInt&lt; man &gt;::ToStringBase()</a>.</p>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="ttmathmisc_8h_source.html">ttmathmisc.h</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
